<?php 
/*
    Template Name: 客栈相册
*/
?>
<?php
$page  = (get_query_var('page'))? get_query_var('page'):1;
$args = array(
					'post_type'=>'post',
					'category_name'=>'photo',
					'posts_per_page'=>8,
			    	'paged'=>$page,
			    	'page'=>$page,
					'order'=>'DESC',
					'orderby'=>'date' ,
					
				);
		$wp_query = new WP_Query();
		$wp_query->query($args) ;
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>汉庭海友客栈</title>
<link href="<?php bloginfo( 'stylesheet_url' ); ?>" rel="stylesheet" type="text/css" />
<link href="<?php bloginfo('template_url'); ?>/css/style.css" rel="stylesheet" type="text/css" />
<link href="<?php bloginfo('template_url'); ?>/css/colorbox.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="<?php bloginfo('template_url'); ?>/js/jquery-1.6.2.min.js"></script>
<script type="text/javascript" src="<?php bloginfo('template_url'); ?>/js/jquery.colorbox.js"></script>
<script type="text/javascript">
$(document).ready(function() {
	$('.gtl').click(function(){
		$("#login").before("<div id='exposeMask' style='*height:"+$("body").height()+"px'></div>");
		$("#login").show();
    });
	$('.close').click(function(){
		$("#exposeMask").remove();
		$("#login").hide();
    });
	$("a[rel='pho']").colorbox();
});
</script>
</head>
<body>
<div id="header">
	<div class="logo"><a href="index.php"></a></div>
	<div class="menu">
		<ul>
			<li><a href="./"><img src="<?php bloginfo('template_url'); ?>/images/menu_1.png" alt="首页" /></a></li>
			<li><a href="list.php"><img src="<?php bloginfo('template_url'); ?>/images/menu_2.png" alt="今日秒杀" /></a></li>
			<li><a href="next.php"><img src="<?php bloginfo('template_url'); ?>/images/menu_3.png" alt="下期预告" /></a></li>
			<li><a href="?page_id=23"><img src="<?php bloginfo('template_url'); ?>/images/menu_4_.png" alt="客栈相册" /></a></li>
			<li><a href="?page_id=12"><img src="<?php bloginfo('template_url'); ?>/images/menu_5.png" alt="常见问题" /></a></li>
		</ul>
	</div>
	<div class="banner">
		<div class="nav">
			<ul>
				<li><a class="gtl"><img src="<?php bloginfo('template_url'); ?>/images/nav_login.png" /></a></li>
				<li><a href="./h/index.html"><img src="<?php bloginfo('template_url'); ?>/images/nav_hello.png" /></a></li>
				<li><a href="explain.php"><img src="<?php bloginfo('template_url'); ?>/images/nav_explain.png" /></a></li>
				<li><a href="http://www.htinns.com/hanting/KZDefault.aspx"  target="_blank"><img src="<?php bloginfo('template_url'); ?>/images/nav_website.png" /></a></li>
			</ul>
		</div>
			<?php get_sidebar();?>
	</div>
</div>
<div id="main" class="fix">
	<div style="padding:20px 0 0 16px;height:55px"><img src="<?php bloginfo('template_url'); ?>/images/tit_xc.png" /></div>
	<div class="plist">
		<ul class="fix">
         <?php if($wp_query->have_posts()):	while ( $wp_query->have_posts() ) : $wp_query->the_post();?>
         <?php $single_post_id=get_the_ID();
			 
			$attach_id = get_post_thumbnail_id(); 
			$attach_img=wp_get_attachment_image_src( $attach_id,'full');
		?>
		<li><a href="<?php echo $attach_img[0];?>" rel="pho" title="<?php the_title();?>"><?php echo get_the_post_thumbnail($single_post_id,'full'); ?><span><?php the_title();?></span></a></li>	
            <?php endwhile;	?>             
         
        
		</ul>
        
          <?php endif;?>
                     
          <?php wp_reset_query();?>
	</div>
	<div class="pagination">
		 <?php pagenavi();?>
	</div>
</div>
<?php get_footer();?>